<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        *{
            margin: 0px;padding: 0px;
        }
        body{
            background: url("img/1.jpg") no-repeat top center;
        }
        div{
            height: 150px;width: auto;
            background: rgba(255,255,255,.3);;
            margin: 100px auto;text-align: center;
        }
        img{
            width: 150px;cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="img/1.jpg" id="img1">
        <img src="img/2.jpg"  id="img2">
        <img src="img/3.jpg" id="img3">
    </div>
    <script type="text/javascript">
        var box = document.getElementById("box");
        var img1 = document.getElementById("img1");
        var img2 = document.getElementById("img2");
        var img3 = document.getElementById("img3");

        img1.onclick = function () {
            document.body.style.backgroundImage ="url(img/1.jpg)";
        }
        img2.onclick = function () {
            document.body.style.backgroundImage ="url(img/2.jpg)";
        }
        img3.onclick = function () {
            document.body.style.backgroundImage ="url(img/3.jpg)";
        }

    </script>

</body>
</html>